package main

import (
    "time"
    "fyne.io/fyne/v2"
    "fyne.io/fyne/v2/app"
    "fyne.io/fyne/v2/widget"
)
func updateTime(clock * widget.Label){
    formatted:=time.Now().Format("Time : 03:04:05")
    clock.SetText(formatted)
}
func main() {
    a := app.New()
    w := a.NewWindow("Clock")

    clock:=widget.NewLabel("")
    updateTime(clock)
    w.SetContent(clock) 
    w.Show()
    
    w2 := a.NewWindow("Clock2")
    clock2:=widget.NewLabel("")
    updateTime(clock2)
    w2.SetContent(clock2) 
    go func(){
        for range time.Tick(time.Second){
            updateTime(clock)
            updateTime(clock2)
        }
    }()
    w2.Resize(fyne.NewSize(100,100))
    w2.Show()

    a.Run()
}
func input(display *widget.Entry,value string) func(){
    return func(){
        display.Text+=value
        display.Refresh()
    }
}